New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

binary-install

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

binary-install

Install binary applications via npm

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
114K
decreased by-25.37%
Maintainers
1
Weekly downloads
 
Created

What is binary-install?

The binary-install npm package is designed to simplify the process of downloading and installing precompiled binary files for Node.js projects. It is particularly useful for developers who need to include native binaries in their projects without requiring users to compile them from source.

What are binary-install's main functionalities?

Download and Install Binaries

This feature allows you to download and install a binary from a specified URL. The `install` function takes the URL of the binary and an options object containing the name and version of the binary. It returns a promise that resolves when the binary is successfully installed.

const { install } = require('binary-install');

const url = 'https://example.com/path/to/binary.tar.gz';
const name = 'example-binary';
const version = '1.0.0';

install(url, { name, version }).then(() => {
  console.log('Binary installed successfully');
}).catch(err => {
  console.error('Failed to install binary:', err);
});

Check for Existing Installation

This feature allows you to check if a binary is already installed. The `exists` function takes the name and version of the binary and returns a boolean indicating whether the binary is already installed.

const { exists } = require('binary-install');

const name = 'example-binary';
const version = '1.0.0';

if (exists(name, version)) {
  console.log('Binary is already installed');
} else {
  console.log('Binary is not installed');
}

Get Binary Path

This feature allows you to get the path to an installed binary. The `path` function takes the name and version of the binary and returns the path to the binary.

const { path } = require('binary-install');

const name = 'example-binary';
const version = '1.0.0';

const binaryPath = path(name, version);
console.log('Binary path:', binaryPath);

Other packages similar to binary-install

Keywords

FAQs

Package last updated on 10 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc